/*
 *    Copyright &copy; Flagstar Bank 2011.
 *
 *    Copyright in the application source code, and in the information and
 *    material therein and in their arrangement, is owned by Flagstar Bank, FSB
 *    unless otherwise indicated.
 *
 *    You shall not remove or obscure any copyright, trademark or other notices.
 *    You may not copy, republish, redistribute, transmit, participate in the
 *    transmission of, create derivatives of, alter edit or exploit in any
 *    manner any material including by storage on retrieval systems, without the
 *    express written permission of Flagstar Bank.
 */

package com.koans.java.arrays;

/**
 * This koan explains creating an array, assigning and reading elements.
 *
 * @author  Venkata Hari
 */

public class ArrayDemo1
{
    /**
     * @param args
     */
    public static void main(final String[] args)
    {
        // Create String array to hold 5 state codes
        String[] states = __ State[5];
        
        //Assign first element
        states[__] = "MI";
        
        //Assign second element
        states[1] = "OH";
        
        //Assign third element
        states[__] = "IL";
        
        //Assign fourth and fifth element
        states[__] = "CA";
        states[__] = "TX";
        
        //Now, read and print the first element from the array
        System.out.println("First element from array is " + states[__]);
        
        //Read and print 4th element from the array
        System.out.println("Fourth element from array is " + states[__]);
        
        //How to get the length of the array
        System.out.println("This array length is " + states.__); 
    }
}
